Repository navigation
[2.1] Fixes #38657: stop logging expected asset not-found at ERROR - #38700
Conversation
The attachments widget asks GET /attachments/fqn/{fqn}/{type} on every
Knowledge Center page; a page without attachments is an expected 404.
AssetRepository logged that EntityNotFoundException at ERROR before
rethrowing, so every such page view became an error-tracker event.
getById and getByFqnPrefix had the same pattern.
Not-found is now rethrown without the ERROR log; the HTTP response is
unchanged (404) and real read failures still log at ERROR.
(cherry picked from commit 4e388ac)
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
Code Review ✅ Approved 🟡 Medium riskSuppressing ERROR logs for asset-not-found exceptions changes monitoring signals; unexpected missing assets may no longer reach Sentry, while 404 responses remain unchanged. Stops logging expected asset not-found responses from VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Describe your changes:
Fixes #38657
Backport of #38658 to
2.1(clean cherry-pick of4e388acaada, no conflicts).AssetRepositorylogged the expected not-found fromgetByFQN/getById/getByFqnPrefixat ERROR before rethrowing. The attachments widget hitsGET /attachments/fqn/{fqn}/{type}on every Knowledge Center page, so every page without attachments became an error-tracker event. Not-found is now rethrown without the ERROR log; the response stays 404 and real read failures still log at ERROR.Type of change:
Tests:
AssetRepositoryTeston this branch:Tests run: 4, Failures: 0, Errors: 0, Skipped: 0.mainin Fixes #38657: stop logging expected asset not-found at ERROR #38658: same calls on a local server returned identical 404/400 responses before and after, with the not-found ERROR lines gone.🤖 Generated with Claude Code